import request from '@/utils/request'
// 获取组题列表
export const getListAPI = (page, pagesize) => {
  return request({
    method: 'post',
    url: '/frame/profile',
    data: { page, pagesize }

  })
}
// 获取基础题库列表
export const getBaseAPI = (page, pagesize) => {
  return request({
    method: 'get',
    url: '/questions',
    params: { page, pagesize }
  })
}
// 获取精选题库列表
export const getChoiceListAPI = () => {
  return request({
    method: 'get',
    url: '/questions/choice'
  })
}
// 精选题库删除
export const delChoiceAPI = (id) => {
  return request({
    method: 'delete',
    url: `/questions/${id}`
  })
}
// 精选题库上下架
export const arriveChoiceAPI = (id, publishState) => {
  return request({
    method: 'post',
    url: `/questions/choice/${id}/${publishState}`,
    data: { id, publishState }
  })
}
